//
//  NetworkPath.h
//  freeRide
//
//  Created by HuangSui on 2017/4/4.
//  Copyright © 2017年 SuiXun. All rights reserved.
//


#import "Masonry.h"
#import "AFNetworking.h"
#import "MBProgressHUD.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "NSString+Util.h"
#import "UIColor+GColor.h"
#import "UIButton+ImageTitleSpacing.h"
#import "AppDelegate.h"
#import <sys/utsname.h>


typedef void(^RequestSuccess) (NSURLResponse *response, id responseObject);
typedef void(^RequestFailed) (NSError * error);






@interface NetworkPath : NSObject
//NS_ENUM，定义状态等普通枚举
typedef NS_ENUM(NSUInteger, TTGState)
{
    TTGStateGet = 0,
    TTGStatePost,
    TTGStateJson,
};
//导航左边按钮
+(UIButton *)SetNavLeftBtnWithController:(UIViewController *)vc withTitle:(NSString *)Btntext andImageName:(NSString *)imageName;
//导航右边按钮
+(UIButton *)SetNavRightBtnWithController:(UIViewController *)vc withTitle:(NSString *)Btntext andImageName:(NSString *)imageName;
//文字提醒弹窗
+ (void)showHUD:(NSString *)text andView:(UIView *)view;
//纯色图片
+ (UIImage*)createImageWithColor:(UIColor*)color;
//空数据替换
+ (id)replaceNullData:(id)obj;


//AF混合数据
+(void)AFmultiWithURLString:(NSString *)URLString andParameters:(NSDictionary*)parameters andValueFilePathWithKeyFileName:(NSDictionary *)fileDic RequestSuccess:(RequestSuccess)requestSuccess RequestFailed:(RequestFailed)requestFailed;
+(void)leaveVC;


//下载
+(void)DownloadTask;
//上传
+(void)UploadTask;
//AF混合数据
+(void)MultiPartRequest:(NSString *)URLString andParameters:(NSDictionary*)parameters andValueFilePathWithKeyFileName:(NSDictionary *)fileDic RequestSuccess:(RequestSuccess)requestSuccess RequestFailed:(RequestFailed)requestFailed;
//AF数据请求
+(void)requestWithMethod:(TTGState)type andURLString:(NSString *)URLString andParameters:(NSDictionary*)parameters RequestSuccess:(RequestSuccess)requestSuccess RequestFailed:(RequestFailed)requestFailed;


+(NSString *)getValue:(NSString *)key from:(id)object;
+(BOOL)isDictionary:(NSString *)key from:(id)object;
+(BOOL)isNSArray:(NSString *)key from:(id)object;



@end
